import request from '/@/utils/request'

// http 请求 二次封装
export const httpRequest = (url: string, data = {}, method = 'post') => {
  const body = JSON.stringify(data) == '{}' ? { url, method } : { url, method, data }
  return request({ ...body })
}

